﻿using System;
using System.Collections.Generic;
using System.Collections;
using CE.Database;

/// <summary>
/// Summary description for HFDependentsDB
/// </summary>
/// 
namespace CE.HomeRefinance
{
    public class HFDependentsDB
    {
        public HFDependentsDB()
        {
            //
            // TODO: Add constructor logic here
            //
        }

        public Int64 Insert(HFDependents hfdependents)
        {
            MyDatabase _db = new MyDatabase();
            Int64 _result = -1;
            string _spName = "[sprocHFDependentsInsertUpdateSingleItem]";

            SortedList _sPara = new SortedList();

            #region Parameter
            _sPara.Add("@HFPersonnelId", hfdependents.HFPersonnelId);
            _sPara.Add("@HFID", hfdependents.HFID);
            _sPara.Add("@HFIsMainBorrower", hfdependents.HFIsMainBorrower);
            _sPara.Add("@HFDependentsDOB", hfdependents.HFDependentsDOB);
            _sPara.Add("@HFRelationship", hfdependents.HFRelationship);
            _sPara.Add("@RefCEUserId", hfdependents.RefCEUserId);
            _sPara.Add("@ViewedDetailId", hfdependents.ViewedDetailId);
            _sPara.Add("@Status", hfdependents.Status);
            #endregion

            _result = _db.ExecuteSP(_spName, _sPara);

            return _result;
        }

    }
}